package com.quik.backend.service;

import java.util.List;
import java.util.Map;

import com.quik.backend.mapper.BaseDao;

public abstract class BaseServiceImpl implements BaseService {

	public abstract BaseDao getDao();
	

	public void updateByFull(Object pojo){
		this.getDao().updateByFull(pojo);
	}

	public void insert(Object pojo){
		this.getDao().insert(pojo);
	}

	public Object queryById(Class clazz, Integer id){
		return this.getDao().queryById(clazz, id);
	}

	public List queryByMap(Class clazz, Map<String, Object> params){
		return this.getDao().queryByMap(clazz, params);
	}

	public List queryByProp(Class clazz, String name, Object value){
		return this.getDao().queryByProp(clazz, name, value);
	}

	public Object queryOneByProp(Class clazz, String name, Object value){
		return this.getDao().queryOneByProp(clazz, name, value);
	}

	public Object queryOneByMap(Class clazz, Map<String, Object> params){
		return this.getDao().queryOneByMap(clazz, params);
	}

	public List load(String sqlName, Object params){
		return this.getDao().load(sqlName, params);
	}
	
}
